// java caller 
 
import clojure.lang.RT;
import clojure.lang.Var;
 
public class RunEngine {
    public static void main(String[] args) throws Exception {
        //Parse the args
	if (args.length < 2 || args.length > 2){

	  System.out.println("Usage: RunEngine <rules_file> <facts_file>" );
	  return; 
	}

	String rules = args[0];
	String facts = args[1];

	//System.out.println(rules);
	//System.out.println(facts);

	// Load the Clojure script -- as a side effect this initializes the runtime.
        RT.loadResourceScript("main.clj");
 
        // Get a reference to the run function.
        Var run = RT.var("main", "run");
 
        // Call it!
        Object result = run.invoke(rules, facts);
    }
}


